package com.production.CoursePlatform.service;

import com.production.CoursePlatform.entity.Student;
import com.production.CoursePlatform.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StudentService {
    @Autowired
    private StudentMapper studentMapper;

    public Student findStudentBySID(String sID) {
        return studentMapper.findBySID(sID);
    }

    public int addStudent(Student student) {
        return studentMapper.insertStudent(student);
    }

    public int updateStudent(Student student) {
        return studentMapper.updateStudent(student);
    }

    public int deleteStudent(String sID) {
        return studentMapper.deleteBySID(sID);
    }

//    public List<Student> findAllStudents() {
//        return studentMapper.selectList(null);
//    }
}

